<template>
  <div>
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="#000">
      <van-swipe-item v-for="(item,index) in banner" :key="index">
        <img :src="item.url" alt />
      </van-swipe-item>
    </van-swipe>
  </div>
</template>
<script>
import { Swipe, SwipeItem } from "vant";
export default {
  name: "swipe",
  props: {
    banner: {
      type: Array,
      default: function() {
        return [];
      }
    }
  },
  components: {
    vanSwipe: Swipe,
    vanSwipeItem: SwipeItem
  },
  data() {
    return {};
  }
};
</script>

<style lang="scss">
.my-swipe {
  .van-swipe__indicator {
    width: 0.35rem;
    height: 0.35rem;
    background-color: #ccc;
  }
}
</style>

<style lang="scss" scoped>
.my-swipe {
  height: 8rem;
  width: 100%;
  img {
    height: 100%;
    width: 100%;
  }
}
</style>